home *** CD-ROM | disk | FTP | other *** search
- property x, Y, spriteNum, right, down, step
-
- on birth me, birthSpriteNum, birthX, birthY
- set x to birthX
- set Y to birthY
- set step to 1
- set leftOrRight to random(2)
- set upOrDown to random(2)
- if leftOrRight = 1 then
- set right to 0
- else
- if leftOrRight = 2 then
- set right to 1
- end if
- end if
- if upOrDown = 1 then
- set down to 0
- else
- if upOrDown = 2 then
- set down to 1
- end if
- end if
- set spriteNum to birthSpriteNum
- return me
- end
-
- on nextStep me
- global toggleDown
- if x > the right of sprite 13 then
- set right to 0
- if not soundBusy(1) then
- puppetSound(1, "Bump")
- end if
- end if
- if x < the left of sprite 13 then
- set right to 1
- if not soundBusy(1) then
- puppetSound(1, "Bump")
- end if
- end if
- if Y > the bottom of sprite 13 then
- set down to 0
- if not soundBusy(1) then
- puppetSound(1, "Bump")
- end if
- end if
- if Y < the top of sprite 13 then
- set down to 1
- if not soundBusy(1) then
- puppetSound(1, "Bump")
- end if
- end if
- if right then
- set x to x + step
- else
- set x to x - step
- end if
- if down then
- set Y to Y + step
- else
- set Y to Y - step
- end if
- set the locH of sprite spriteNum to x
- set the locV of sprite spriteNum to Y
- if rollOver(18) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set down to 0
- set step to 2
- if not soundBusy(1) then
- puppetSound(1, "Top")
- end if
- end if
- else
- if rollOver(19) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set down to 0
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Top")
- end if
- end if
- else
- if rollOver(20) then
- if toggleDown = 0 then
- set toggleDown to 1
- set down to 0
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Top")
- end if
- end if
- else
- if rollOver(21) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set down to 0
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Top")
- end if
- end if
- else
- if rollOver(22) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set down to 0
- set step to 2
- if not soundBusy(1) then
- puppetSound(1, "Top")
- end if
- end if
- else
- if rollOver(23) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Middle")
- end if
- end if
- else
- if rollOver(24) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Middle")
- end if
- end if
- else
- if rollOver(25) then
- if toggleDown = 0 then
- set toggleDown to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Middle")
- end if
- end if
- else
- if rollOver(26) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Middle")
- end if
- end if
- else
- if rollOver(27) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Middle")
- end if
- end if
- else
- if rollOver(28) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set down to 1
- set step to 2
- if not soundBusy(1) then
- puppetSound(1, "Bottom")
- end if
- end if
- else
- if rollOver(29) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 0
- set down to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Bottom")
- end if
- end if
- else
- if rollOver(30) then
- if toggleDown = 0 then
- set toggleDown to 1
- set down to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Bottom")
- end if
- end if
- else
- if rollOver(31) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set down to 1
- set step to 1
- if not soundBusy(1) then
- puppetSound(1, "Bottom")
- end if
- end if
- else
- if rollOver(32) then
- if toggleDown = 0 then
- set toggleDown to 1
- set right to 1
- set down to 1
- set step to 2
- if not soundBusy(1) then
- puppetSound(1, "Bottom")
- end if
- end if
- else
- set toggleDown to 0
- set step to 1
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end
-